﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace Projet_Synthese
{
    public class Parallelogramme : FormeGeometrique
    {
        public override int Surface
        {
            get { return 2; }
        }
        public Parallelogramme(Texture2D[] texture, int idTexture, Rectangle source, Rectangle destination)
            : base(texture, idTexture, source, destination)
        {
        }
        public Parallelogramme(Texture2D[] texture, Rectangle destination)
            : base(texture, IdTexture.Parallelogramme, new Rectangle(0, 0, 119, 42), destination)
        {
        }
        public override string Name
        {
            get { return "Parallelogramme"; }
        }
        protected override bool testProcheAvecRotation(float angle1, float angle2)
        {
            float diffRatation = Math.Abs(angle1 - angle2) % MathHelper.Pi;
            Console.WriteLine(diffRatation);
            return diffRatation < THETAANGLE || Math.Abs(diffRatation - MathHelper.Pi) < THETAANGLE;
        }
    }
}
